<?php

$CKORI = $GLOBALS['MYT']->db_array("SELECT OriClave FROM Origenes WHERE OriNumero = {$_SESSION[$SESSCD]}");

if ($_POST['OriKey'] == $CKORI[1]['OriClave']) {
    $qr_OBJ = $_POST['CliNumero'];
    if ($GLOBALS['MYT']->db_query("INSERT INTO hd_bloqueos
	(blk_Fecha, blk_Codigo, lbk_Tipo, lbk_Nivel, blk_Usuario, blk_Informacion, blk_STATUS)
	VALUES
	('{$sysTime}',{$qr_OBJ},1,1,{$_SESSION[$SESSID]},'{$_POST['BLK_MSG']}',{$_POST['CliBlock']})") == true) {
        $PRRC = $GLOBALS['MYT']->db_query("UPDATE
			clientes
			SET
				CliBloqueado = {$_POST['CliBlock']}
			WHERE CliNumero = {$qr_OBJ}");
        echo '<script charset="utf-8" type="text/javascript">replaceUrl(\'contents\',\'_response/call.php?get=Operative/client&CID=' . $qr_OBJ . '\');
            document.getElementById(\'BLK_CONF\').innerHTML=\'\');</script>';
        echo 'Concluido.';
    }
} else {
    echo 'Acesso Negado.';
}